home *** CD-ROM | disk | FTP | other *** search
/ Graphics & Sound Program…ng Techniques for the Mac / Graphics and Sound Programming Techniques for the Mac.iso / M&T Graphics & Sound Examples / Metrowerks Versions / C09 App-QuickTime / P01 Film Edit / Initialize.c < prev    next >
Encoding:
Text File  |  1995-08-05  |  1.4 KB  |  69 lines  |  [TEXT/MMCC]

  1.  
  2. //____________________________________________________________
  3. //    Initialize.c
  4. //
  5. //    Copyright © Dan Parks Sydow, 1995
  6. //    From the book:
  7. //    "Graphics and Sound Programming Techniques for the Mac",
  8. //    M&T Books, 1995
  9.  
  10.  
  11. //____________________________________________________________
  12.  
  13. #include <Gestalt.h>
  14. #include <Movies.h>
  15.  
  16. #include "Defines.h"
  17. #include "DataTypes.h"
  18. #include "Globals.h"
  19. #include "Initialize.h"
  20.  
  21.  
  22. //____________________________________________________________
  23.  
  24. void  InitializeAllToolboxes( void )
  25. {
  26.    OSErr  theError;
  27.    long   theResult;
  28.  
  29.    InitGraf( &qd.thePort );
  30.    InitFonts();
  31.    InitWindows();
  32.    InitMenus();
  33.    TEInit();
  34.    InitDialogs( 0L );
  35.    FlushEvents( everyEvent, 0 );
  36.    InitCursor();
  37.  
  38.    MoreMasters();
  39.    MoreMasters();
  40.    MaxApplZone();
  41.    
  42.    theError = Gestalt( gestaltQuickTime, &theResult );
  43.    if ( theError != noErr )
  44.       ExitToShell();
  45.                                                  
  46.    theError = EnterMovies();  
  47.    if ( theError != noErr )
  48.       ExitToShell(); 
  49. }
  50.  
  51.  
  52. //____________________________________________________________
  53.  
  54. void  SetUpMenuBar( void )     
  55. {       
  56.    Handle      theMenuBar;  
  57.    MenuHandle  theAppleMenu;
  58.    
  59.    theMenuBar = GetNewMBar( rMenuBar );      
  60.    SetMenuBar( theMenuBar );
  61.    DisposeHandle( theMenuBar );
  62.    
  63.    theAppleMenu = GetMHandle( mApple );
  64.    AddResMenu( theAppleMenu, 'DRVR' ); 
  65.  
  66.    DrawMenuBar(); 
  67. }
  68.  
  69.